﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using TeamCityMonitor.Models;
using TeamCitySharp.DomainEntities;

namespace TeamCityMonitor.Repository.Caches
{
    public class TeamCitySlowDataCacheObject
    {
        public TeamCitySlowDataCacheObject()
        {
            TroubledProjects = new List<ProjectModel>();
            Users = new List<User>();
            NoOfProjects = NoOfConfigurations = NoOfSuccessfullBuildsSince = NoOfFailingBuildsSince = NoOfErrorBuildsSince = 0;
            BuildConfigurations = new List<BuildConfig>();
            NoOfBuildsByUser = new Dictionary<string, int>();
            NoOfSuccessfullBuildsByBuildConfig = new Dictionary<string, int>();
            NoOfFailingBuildsByBuildConfig = new Dictionary<string, int>();
            NoOfErrorBuildsByBuildConfig = new Dictionary<string, int>();
            ServerInfo = new Server();
        }

        public List<ProjectModel> TroubledProjects;
        public List<User> Users;
        public Server ServerInfo;
        public int NoOfProjects;
        public int NoOfConfigurations;

        public int NoOfSuccessfullBuildsSince;
        public int NoOfFailingBuildsSince;
        public int NoOfErrorBuildsSince;

        public List<BuildConfig> BuildConfigurations;

        public Dictionary<string, int> NoOfBuildsByUser;
        public Dictionary<string, int> NoOfSuccessfullBuildsByBuildConfig;
        public Dictionary<string, int> NoOfFailingBuildsByBuildConfig;
        public Dictionary<string, int> NoOfErrorBuildsByBuildConfig;
    }
}